package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.reggie.dto.DishDto;
import com.itheima.reggie.entity.Dish;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface DishService {
    void addDish(DishDto dishDto);

    DishDto queryDishById(Long id);

    Page<DishDto> getDishPage(int page, int pageSize, String name);

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    void deleteDish(List<Long> ids);

    void dishStatusByStatus(Integer status, List<Long> ids);

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    void editDish(DishDto dishDto);

    List<DishDto> queryDishList(Dish dish);
}
